package com.kcwl.carrier.domain.repository;

import com.kcwl.carrier.infrastructure.repository.po.CarrierCollectionCompanyInfoPO;
import com.kcwl.carrier.interfaces.command.CarrierCompanyCommand;
import com.kcwl.carrier.interfaces.dto.CarrierCollectionCompanyInfoDTO;
import com.kcwl.carrier.interfaces.query.CarrierCompanyQuery;
import com.kcwl.ddd.domain.repository.IBaseRepository;

import java.util.List;

public interface ICarrierCollectionRepository extends IBaseRepository<CarrierCollectionCompanyInfoPO> {

    CarrierCollectionCompanyInfoPO getCarrierCompany(CarrierCompanyQuery query);

    /**
     * 新增
     */
    int addCarrierCompany(CarrierCompanyCommand command);

    /**
     * 更新
     */
    int updateCarrierCompany(CarrierCompanyCommand command);

    /**
     * 取消货主收藏
     * @param query
     * @return
     */
    List<CarrierCollectionCompanyInfoDTO> getCollectShippers(CarrierCompanyQuery query);


    /**
     * 查询货主收藏数量
     * @param query
     * @return
     */
    int getCollectCount(CarrierCompanyQuery query);

}
